-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework usage of FFMPEG_VideoReader's pos
and lastread
; FFMPEG_AudioReader.close_proc() -> close()
#1220
Rework usage of FFMPEG_VideoReader's pos
and lastread
; FFMPEG_AudioReader.close_proc() -> close()
#1220
Conversation
pos
and lastread
; FFMPEG_AudioReader.close_proc() -> close()pos
and lastread
; FFMPEG_AudioReader.close_proc() -> close()
Is there anything I could do to help move this one along? A release with this fix would be appreciated |
I like to leave largish PRs open for a while in case anyone wants to review it or object to it, but I'm happy to merge this one today. Do you need it included in a pip-installable release (v2.0.0.dev2)? |
@tburrows13 if that is convenient for you it would be awesome |
Sure. My only holdup is that I merged #1063 but I've since decided that I wasn't so sure about that change. I need to do some more research about ffmpeg's durations and decide whether it is ok as-is, whether it should be reverted or whether #1222 is a suitable fix. Shouldn't be more than a couple of days. |
@tburrows13 sounds good. I can force use of master from github in the meantime. thanks! |
@tburrows13 forgot to mention this fixed all of my expected failures around this issue! awesome work |
Hi guys! Haven't you released this fix yet? No option to install it via pip?.. |
Hi @fancydancing, stay tuned, I'm planning a prerelease pip release this week that will include this :) |
Thank you! Can't wait :) we're using your cool package in production and it started causing errors when making thumbnails for videos (which is by the way strange, nothing changed there...). So this prerelease would help us a lot ) Thank you for your work! |
This PR has now been included in v2.0.0.dev2. Sorry for the delay and let us know how it goes :) |
Hi Tom! Upgraded to 2.0.0.dev2. Seems that it solves my problem!) But I have troubles installing it with Pipfile. It's not on PyPi, right? |
It is on PyPI as a prerelease (https://pypi.org/project/moviepy/#history). With pip you can install it by using the |
Thanks) Yes, pip install went well, will keep googling about pipfile then. Anyway, this issue is gone for me and it is great! |
Still facing the same error even if I make the upgrade.
`Python 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37)
|
@josebenitezg would you mind making a new issue with that information please? Are you able to provide the videofile that is causing the crash? PS Use 3 backticks at the start and end of your code to format it properly :) |
我升级到最新版本
我升级到最新版本 pip install moviepy==2.0.0.dev2 还是无法解决 |
可以试试把num_workers改为1,报错频率会降低;报错后,从断点重启即可 |
Closes #1078, closes #1191, closes #648.
In general, this PR simplifies the handling of
reader.pos
by updating it only whenreader.proc
is created or accessed. This keeps the 2 up-to-date with each other.I also fixed #1078 by ensuring that when the clip is being closed only to be reopened straight away,
lastread
is not deleted. This can happen legitimately (when we need to get a frame before the previous one or when we skip far ahead), but it can also happen if the reader has been previously closed and is then called upon. I still don't know why this is allowed, so perhaps it should be removed in the future?I renamed
FFMPEG_AudioReader.close_proc()
to.close()
to stay consistent withFFMPEG_VideoReader
. In the future I might look at combining these 2 classes, probably with each of them inheriting a base FFMPEG_Reader class. This will avoid duplicating the (quite complex!) code and make it easier to analyse and fix.Finally, I removed the
logging.captureWarnings(True)
(#1191) so that the tests would work. I will probably revisit how MoviePy handles warnings/logging in the future.tests/
black -t py36